import { Router, Route, Switch } from "dva/router";
import React from "react";
import Login from "./pages/login/login";
import Layout from "./pages/layout/layout";
import listenRoute from "./utils/listenRoute"
import locale from 'antd/es/locale/zh_CN';
import { ConfigProvider } from 'antd';
export default ({ history }) => {
  listenRoute(history)
  return (

    <ConfigProvider locale={locale}>
      <Router Router history={history} >
        <Switch>
          <Route path="/login">
            <Login></Login>
          </Route>
          <Route path="/">
            <Layout></Layout>
          </Route>
        </Switch>
      </Router >
    </ConfigProvider>



  );
};